package com.th.supcom.pds.phamapply.client.widget.inpharmacyreturn;

import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.th.supcom.pds.common.client.commom.FieldPanel;

/**
 * 退药信息面板
 * 
 * @author yzhang
 */
public class NurseReturnQueryPanel extends FieldSet
{
    /** 门诊退药文本域集合. */
    private final NurseReturnFields m_nurseReturnFields;
    /** 门诊退药按钮集合. */
    private final NurseReturnButtons m_nurseReturnButtons;

    /**
     * 构造方法
     * 
     * @param drugReturnAndRefundFields
     * @param drugReturnButtons
     */
    public NurseReturnQueryPanel (NurseReturnFields nurseReturnFields, NurseReturnButtons nurseReturnButtons)
    {
        m_nurseReturnFields = nurseReturnFields;
        m_nurseReturnButtons = nurseReturnButtons;
        initUI ();
    }

    /**
     * 初始化界面
     */
    private void initUI ()
    {
        setHeading ("退药查询");
        setLayout (new FitLayout ());
        FieldPanel pp = new FieldPanel ();
        pp.setLabelAlian ("L");

        pp.addCol (m_nurseReturnFields.getBedNoField (), 2, null, 60);
        pp.addCol (m_nurseReturnFields.getPatiIdField (), 2, null, 60);
        pp.addCol (m_nurseReturnFields.getWatchTimes (), 2, null, 60);
        pp.addCol (m_nurseReturnButtons.getQueryBtn (), 1, null, null);
        pp.addCol (new LayoutContainer (), 1, null, null);
        pp.newRow ();

        // pp.addCol (m_nurseReturnButtons.getGenerateTypeGroup (), 4, null, 0);
        // FormLayout layout1 = new FormLayout (LabelAlign.LEFT);
        // layout1.setLabelWidth (27);
        // LayoutContainer beginContainer = new LayoutContainer (layout1);
        // beginContainer.add (m_nurseReturnFields.getBeginField (), new
        // FormData ("90%"));
        // pp.addCol (beginContainer, 2, null, 0);
        // FormLayout layout2 = new FormLayout (LabelAlign.LEFT);
        // layout2.setLabelWidth (27);
        // LayoutContainer endContainer = new LayoutContainer (layout2);
        // endContainer.add (m_nurseReturnFields.getEndField (), new FormData
        // ("90%"));
        // pp.addCol (endContainer, 2, null, 0);

        // pp.addCol (m_nurseReturnButtons.getQueryBtn (), 1, null, null);
        // pp.addCol (new LayoutContainer (), 3, null, null);
        // pp.newRow ();
        add (pp);
    }
}
